<?php
$client = new swoole_client(SWOOLE_SOCK_UDP);
if (!$client->connect('0.0.0.0', 9502, -1))
{
    exit("connect failed. Error: {$client->errCode}\n");
}
$i = 0;
while ($i < 1000) {
    $client->send($i."\n");
    $message = $client->recv();
    echo "Get Message From Server:{$message}\n";
    $i++;
}
$client->close();